package com.mstarc.app.mnfc;

import android.util.Log;

import com.mstarc.app.mnfc.mstarcApiUtils.BytetohexStringUtil;

/**
 * @author 崔健伟
 * @version V1.0
 * @Title: LogUtil.java
 * @Package com.mstarc.app.mnfc
 * @Description:
 * @date 2017/7/18 13:53
 */
public class LogUtil {
    private static final String TAG = "MainActivity";

    public static void logIntArray(int[] intArray, String tagTitle) {
        String str = "";
        if (intArray != null && intArray.length >= 0) {
            for (int i : intArray) {
                str += i + ",";
            }
            if (str.length() > 0) {
                str = str.substring(0, str.length() - 1);
            }
        }
        if (intArray.length > 1) {
            startLog(tagTitle, BytetohexStringUtil.BytetohexString(intArray));
        } else {
            startLog(tagTitle, str);
        }
    }

    public static void startLog(String logTitle, String logContent) {
        Log.d(TAG, logTitle + logContent);
    }
}
